<template>
<div class="row">
  <system-info></system-info>
  <culster-cfg v-if="supportCluster"></culster-cfg>
  <soft-upgrade v-if="supportUpgrade"></soft-upgrade>
</div>
</template>

<script>
import SystemInfo from './SystemInfo.vue'
import ClusterCfg from './ClusterCfg.vue'
import SoftUpgrade from './SoftUpgrade.vue'
import * as actions from 'share/server/vuex/actions/system.js'

export default {
  components: {
    'system-info': SystemInfo,
    'culster-cfg': ClusterCfg,
    'soft-upgrade': SoftUpgrade
  },
  vuex: {
    getters: {
      platform: (state) => state.system.platform
    },
    actions
  },
  computed: {
    supportCluster () {
      return this.platform.devModel.includes('pc')
    },
    supportUpgrade () {
      return this.platform.devModel.includes('pc')
    }
  },
  ready () {
    this.loadSystemState({init: true})
  }
}
</script>

<style>
</style>